import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
// vuex中定义存储用户信息变量与修改用户信息的方法
export default new Vuex.Store({
  state: {
    userInfo: '',
    channelsList: []
  },
  mutations: {
    setUserInfo (state, value) {
      state.userInfo = value
    },
    saveChannel (state, value) {
      state.channelsList = value
    }
  },
  actions: {},
  modules: {}
})
